﻿<%@ Page Title="ScrumPeak.com" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
  AutoEventWireup="true" Inherits="MvcContrib.FluentHtml.ModelViewPage<StoryModel>" %>

<%@ Import Namespace="Peak.Web.Controllers.HtmlExtentions" %>
<%@ Import Namespace="Peak.Resources" %>
<%@ Import Namespace="Peak.Web.Controllers.Models" %>
<%@ Import Namespace="Peak.Web" %>  
<asp:Content ContentPlaceHolderID="center" runat="server">
  <script type="text/javascript">
    $(document).ready(function() {
      $(".form :input:visible:enabled:first").focus();
    });
  </script>

  <div class="page-content">
    <div class="page-title">
      <%= PageTitles.EditStory %>
    </div>
    <form method="post">
      <%= this.Hidden(f=>f.StoryId) %>
      <table class="form">
        <tbody>
          <tr>  
            <td class="formLabel" align="right">
              <%= Labels.Name %>
            </td>
            <td class="fieldName">
              <%= this.TextBox(f=>f.Name) %><br />
              <%= this.ValidationMessage(f=>f.Name) %>
            </td>
          </tr>
          <tr>  
            <td class="formLabel" align="right">
              <%= Labels.Category %>
            </td>
            <td>
              <%= this.TextBox(f=>f.Category) %><br />
              <%= this.ValidationMessage(f=>f.Category) %>
            </td>
          </tr>
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.Priority %>
            </td>
            <td>
              <%= this.TextBox(f=>f.Priority) %><br />
              <%= this.ValidationMessage(f=>f.Priority) %>
            </td>
          </tr>
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.StoryPoints %>
            </td>
            <td>
              <%= this.TextBox(f=>f.StoryPoints)%><br />
              <%= this.ValidationMessage(f=>f.StoryPoints) %>
            </td>
          </tr>   
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.Description %>
            </td>
            <td>
              <%= this.TextArea(f => f.Description)%>
              <%= this.ValidationMessage(f => f.Description)%>
            </td>
          </tr>    
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.HowToDemo %>
            </td>
            <td>
              <%= this.TextArea(f => f.HowToDemo)%>
              <%= this.ValidationMessage(f => f.HowToDemo)%>
            </td>
          </tr> 
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.Requester %>
            </td>
            <td>
              <%= this.TextBox(f => f.Requester)%>
              <%= this.ValidationMessage(f => f.Requester)%>
            </td>
          </tr> 
          <tr>
            <td class="formLabel" align="right">
              <%= Labels.Status %>
            </td>
            <td>
              <%= Html.DropDownList("status", Enums.GetStoryStatusValues(Model.Status))%> <br />
              <%= this.ValidationMessage(f => f.Status)%>
            </td>
          </tr>           
          <tr>
            <td>
            </td>
            <td>
              <%= Html.OkButton()%>
              <%= Html.CancelButton() %>
            </td>
          </tr>
        </tbody>
      </table>
    </form>
  </div>
</asp:Content>
